package com.yc.springcloud.utils;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;


/**
 * @Author DELL
 * @Date 2024/10/4 16:21
 * @Version 1.0
 */
@Configuration
public class CustomizationBean {

	@Bean
	@LoadBalanced //注解@LoadBalanced 赋予RestTemplate负载均衡的能力
	public RestTemplate getRestTemplate() {
		return new RestTemplate();
	}
}
